package com.csrcb;

import com.csrcb.dao.CalcTime;
import com.csrcb.service.EMSService;

import java.util.Timer;
import java.util.TimerTask;

/**
 * @Classname AppStart
 * @Description 启动类
 * @Date 2020/12/15 9:05
 * @Created by gangye
 */
public class AppStart {
    public static void main(String[] args) {
        CalcTime.init();

        //此处也可以使用定时任务的jar包quartz实现
        Timer ti = new Timer();
        //在3秒后执行MyTask类中的run方法,后面每10秒跑一次
        ti.schedule(new QueryTask(), 3000,10000);

    }
}

class QueryTask extends TimerTask{
    @Override
    public void run() {
        new EMSService().boolEmsStatusForWeChatRemind();
    }
}